package com.jyx.manage_course;

import com.jyx.framework.interceptor.FeignClientInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
@EnableFeignClients //开始feignClient
@EnableDiscoveryClient
@EntityScan("com.jyx.framework.domain.course")//扫描实体类
@ComponentScan(basePackages={"com.jyx.api"})//扫描接口
@ComponentScan(basePackages={"com.jyx.manage_course"})
@ComponentScan(basePackages={"com.jyx.framework"})//扫描common下的所有类
@MapperScan(basePackages = {"com.jyx.manage_course"})
public class ManageCourseApplication {
    public static void main(String[] args) {
        SpringApplication.run(ManageCourseApplication.class, args);
    }
    @Bean
    public FeignClientInterceptor feignClientInterceptor(){
        return new FeignClientInterceptor();
    }
}
